﻿//-----------------------------------------------------------------------
// <copyright file="EmailViewModel.cs" company="OverrideThis">
//     Copyright (c) 2010 OverrideThis.com
// </copyright>
//-----------------------------------------------------------------------
namespace OverrideThis.ContactManager.WebSite.Models
{
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;
    using OverrideThis.ContactManager.WebSite.Helpers;
    using OverrideThis.ContactManager.WebSite.Infrastructure.Validators;

    public class EmailViewModel
    {
        [HiddenInput(DisplayValue = false)]
        [Required]
        public int PersonId { get; set; }

        [HiddenInput(DisplayValue = false)]
        [Required]
        public int Id { get; set; }

        [Required]
        [RegularExpression(AppGlobalConstants.EMAIL_REGEX, ErrorMessage = AppGlobalConstants.EMAIL_REGEX_ERROR_MESSAGE)]
        [CorporateEmail("excella.com")]
        public string EmailAddress { get; set; }
    }
}